﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ncp.Business
{
    public class CommonConst
    {
        public static string SMTP = "mail.magnsoft.com";
        public static string FROM_EMAIL = "data@magnsoft.com";
        public static string FROM_PWS = "abc123456";
        public const string FROM_DISPLAYNAME = "BM Data Center";
        public const string EMAIL_SUBJECT = "BM Data Center Email Notification";
        public static string EMAIL_Type = "";
        public static string Project_Status = "";
        public const string strRateDecimal = "{0:P2}";//比率小数位数
        public const string gVersion = "V4.06.5";
        public const string DOCSVersion = "V1.0";
        public const int gLeaveMinutes = 20;
        public const string gEntryFlag = "[UK],[NK],[ND],[NA]";
        public const string gDefaultValue = "[USER_NAME],[SITE_NO],[RAND_ID],[RAND_NAME],0001-01-01,[Year],[Month],[Day]";
        public const string gProjectAdminRoleGuid = "5bfa1815-e773-4ef6-b180-ff8f8dfc2497";
        public const string gPlatformAdminRoleGuid = "c11611f4-12dd-450d-a39f-c2d482d425b0";
        //管理员登陆cookie名称
        public const string adminCookieName = "ADMINLOGIN";
        public const string DB_Name = "ncp";

        /// <summary>
        /// 取出['xxx.xxx.xx'] or [xxx.xxx.xx]不带[]
        /// </summary>
        public const string pString1 = @"(?<=\[)[^\]]+"; 

        /// <summary>
        /// 取出['xxx.xxx.xx'] or [xxx.xxx.xx]带[]
        /// </summary>
        public const string pString2 = @"\[[^\]]+\]"; 

        /// <summary>
        /// 匹配'xxxx.xxx.xx'或xxxx.xxx.xx的字符(x= _A-Za-z )
        /// </summary>
        public const string pString3 = @"^[']?\w+[\.]\w+[\.]\w+[']?$";

        /// <summary>
        /// 匹配['xxxx.xxx.xx']或[xxxx.xxx.xx]的字符(x= _A-Za-z )
        /// </summary>
        public const string pString4 = @"^[\[]{1}[']{0,1}\w+[\.]\w+[\.]\w+[']{0,1}[\]]{1}$";

        /// <summary>
        /// 匹配'xxxx.xxx.xx'
        /// </summary>
        public const string pString5 = @"^[']\w+[\.]\w+[\.]\w+[']$";

        public static string[] arrCharUpper = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P","Q",  "R", "S", "T", "U","V",  "W", "X", "Y", "Z" };
        public static string[] arrCharLower = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
        public static string[] arrCharNumber = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };

        //产品供应限制
        public static int[] ArrProductLimit = {30, 40, 60, 100};

        
        public const int gDefaultPoints = 5000;//注册时的默认积分
        public const int gLosePoints = 500;//每发布一个产品所扣的积分
        public const int gLoginPoints = 5;//每登录一次所加积分
        public const int gLeavePoints = 3; //每留言一次，将增加3分
        public const int gClickPoints = 1;//每次点击站内的一个页面超链接增加1分
        public const int gNewsPoints = 10;//每次点击站内的一个页面超链接增加1分

    } 
}
